#pragma once
#include <windows.h>
#include <winuser.h>
#include "wnd.h"
#include "winapi.h"
//#include "MemDC.h"

class CFrame : public CScrollWnd
{
public:
	CFrame(void);
	~CFrame(void);

	HWND Create(int x, int y, int nWidth, int nHeight, HWND hWndParent);
	virtual LRESULT OnMessage(UINT iMsg, WPARAM wParam, LPARAM lParam);
	static LRESULT CALLBACK Procedure(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam);
	void Resize(int x, int y, int w, int h);

	inline HWND GetWnd() {return hWnd;}
	inline operator HWND() {return hWnd;}

	virtual void OnPaint();
	virtual void OnNCPaint(HDC hdc);
	virtual void Draw(HDC hdc) {};

	SIZE ClientSize;
	int HScrollPos, VscrollPos;
};
